class VineRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;

	VineRenderer(ITexture *texture) :
		Texture(texture)
	{
	}

	int GetTypeData(const int &data) { return 0; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		if ((block.Data & 0x1) != 0)
			renderer->Draw(Face(Point3f(16, 0, 15), Point3f(0, 0, 15), Point3f(0, 16, 15), Point3f(16, 16, 15), Colorb(73, 205, 51, 255), Texture, Point2i(15 * 16, 8 * 16), 16, 16));
		if ((block.Data & 0x4) != 0)
			renderer->Draw(Face(Point3f(0, 0, 1), Point3f(16, 0, 1), Point3f(16, 16, 1), Point3f(0, 16, 1), Colorb(73, 205, 51, 255), Texture, Point2i(15 * 16, 8 * 16), 16, 16));

		if ((block.Data & 0x2) != 0)
			renderer->Draw(Face(Point3f(1, 0, 16), Point3f(1, 0, 0), Point3f(1, 16, 0), Point3f(1, 16, 16), Colorb(73, 205, 51, 255), Texture, Point2i(15 * 16, 8 * 16), 16, 16));
		if ((block.Data & 0x8) != 0)
			renderer->Draw(Face(Point3f(15, 0, 0), Point3f(15, 0, 16), Point3f(15, 16, 16), Point3f(15, 16, 0), Colorb(73, 205, 51, 255), Texture, Point2i(15 * 16, 8 * 16), 16, 16));

		const Block &above = schematic->GetBlock(position.X, position.Y + 1, position.Z);

		if (block.Data == 0 || above != Block::Empty)
			renderer->Draw(Face(Point3f(0, 1, 16), Point3f(16, 1, 16), Point3f(16, 1, 0), Point3f(0, 1, 0), Colorb(73, 205, 51, 255), Texture, Point2i(15 * 16, 8 * 16), 16, 16));
	}
};